package com.scalar.chiptrack.operations.lotcorrection.forms;

import com.scalar.chiptrack.ChipTrackActionForm;
import com.scalar.chiptrack.operations.lotcorrection.LotCorrection;

import org.apache.struts.action.ActionMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * 
 * Author  : rohan
 * Date    : Jul 27, 2004
 * Version : 1.0 
 */
public class LotCorrectionForm extends ChipTrackActionForm
{
    private LotCorrection lotCorrection;
    private String lotId;
    private String processType;
    private String processStepId;
    private String locationId;

    public LotCorrection getLotCorrection()
    {
        return lotCorrection;
    }

    public void setLotCorrection( LotCorrection lotCorrection )
    {
        this.lotCorrection = lotCorrection;
    }

    public String getLotId()
    {
        return lotId;
    }

    public void setLotId( String lotId )
    {
        this.lotId = lotId;
    }

    public String getProcessType()
    {
        return processType;
    }

    public void setProcessType( String processType )
    {
        this.processType = processType;
    }

    public String getProcessStepId()
    {
        return processStepId;
    }

    public void setProcessStepId( String processStepId )
    {
        this.processStepId = processStepId;
    }

    public String getLocationId()
    {
        return locationId;
    }

    public void setLocationId( String locationId )
    {
        this.locationId = locationId;
    }

    public void reset( ActionMapping mapping, HttpServletRequest request )
    {
        if( lotCorrection == null )
        {
            lotCorrection = new LotCorrection();
        }
        else
        {
            lotCorrection.setHold( false );   // Added by Kumaraswamy on 19th Oct, 2004.
            if( lotCorrection.getNextStageLotList() != null )
            {
                for( int i = 0; i < lotCorrection.getNextStageLotList().size(); i++ )
                {
                    ( ( LotCorrection )lotCorrection.getNextStageLotList().get( i ) ).setModify( false );
                }
            }
        }

    }
}
